#!/usr/bin/python
# -*- coding: utf-8 -*-


if __name__=='__main__':
    str = raw_input()
    li= list(str)#map(int, raw_input().split())23
    #print(li)
    A = ''
    A = list(set(A))
    B = ''
    B = list(set(B))
    #用Set
    for i in range(len(li)):
        B = li[i]
        A = list(set(A).union(set(B)))
    #排序后倒序输出
    A.sort()
    AA = A[::-1]
    res = ''
    for i in range(len(AA)):
        res+=AA[i]

    print(res)